package com.example.qxfw.qxxx.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.example.qxfw.common.entity.xt.ContourSetting;
import com.example.qxfw.qxxx.mapper.ContourSettingMapper;
import com.example.qxfw.qxxx.service.ContourSettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ContourSettingServiceImpl implements ContourSettingService {

    @Autowired
    private ContourSettingMapper contourSettingMapper;

    @Override
    public List<ContourSetting> getList(String elementType) {
        LambdaQueryWrapper<ContourSetting> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(ContourSetting::getElementtype,elementType)
                .orderByDesc(ContourSetting::getElementvalue);
        List<ContourSetting> contourSettings = contourSettingMapper.selectList(queryWrapper);
        return contourSettings;
    }


}
